<template>
	<view class="mes" @click="showdetail(item)">
		<img :src="pic" alt="" class="headimg" />
		<view>
			<h2 class="title">{{title}}</h2>
			<view class="content">
				{{content}}
			</view>
		</view>
		<view class="status cu-item text-red" v-if='status==0'>
			已取消
		</view>
		<view class="status cu-item text-yellow" v-else-if='status==1'>
			待匹配
		</view>
		<view class="status cu-item text-green" v-else>
			已匹配
		</view>
	</view>
</template>

<script>

	export default {
		props: ['title', 'pic', 'content','status'],
		data() {
			return {
			}
		},
		methods: {
			showdetail(item) {
				// uni.$emit('showdialog',item)
				console.log(item)
				uni.navigateTo({
					url: `/subpkg/mes_detail/mes_detail?id=${item.title}`
				})
			}
		}
	};
</script>

<style scoped lang="less">
	.mes {
		z-index: 5;
		display: flex;
		margin-top: 10rpx;
		border: 1px solid #F0F8FF;
		height: 170rpx;
		align-items: center;
	}

	.headimg {
		width: 100rpx;
		height: 100rpx;
		margin-right: 50rpx;
		border-radius: 75%;
	}

	.content {
		width: 500rpx;
		font-size: 25rpx;
	}

	.title {
		font-weight: 500;
		font-size: 30rpx;
	}

	.bg {
		width: 100%;
		height: 74%;
		z-index: 0;
		position: absolute;
	}
	
	.status{
		font-size: small;
	}
</style>